package com.teamwork.ZuccEcho.Service.impl;

import com.teamwork.ZuccEcho.Entity.Qnquestion;
import com.teamwork.ZuccEcho.Repository.QuestionApiRepository;
import com.teamwork.ZuccEcho.Service.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class QuestionServiceImpl implements QuestionService {
    @Autowired
    private QuestionApiRepository questionApiRepository;
    @Override
    public List<Qnquestion> getQuestionList() {
        return questionApiRepository.findAll();
    }

    @Override
    public Qnquestion findQuestionById(long id) {
        return questionApiRepository.findById(id);
    }
}
